{% extends "with_header.html" %}

{% block body %}
<!-- Begin user feeds -->

<h2 align="center">Public Albums</h2>
<table align="center" width="500px">
{% if not feeds %}
  <tr><td>You don't have any public albums!</td></tr>
{% else %}
  <tr style="white-space:nowrap">
    <th>Picasa Title</th><th># of Photos</th><th>Date</th><th>Visibility</th><th>Status</th><th>Preview</th>
  </tr>
  {% for feed in feeds %}
    <tr>
      <td>{{ feed.title.text }}</td>
      <td>{{ feed.numphotos.text }}</td>
      <td>{{ feed.formatted_update }}</td>
      <td>{{ feed.is_public|yesno:"Public,Private" }}</td>
      {% if not feed.is_published %}
      <td><a href="/my/publish?a={{ feed.gphoto_id.text }}">publish</a></td>
      {% else %}
      <td><a href="/my/unpublish?a={{ feed.gphoto_id.text }}">unpublish</a></td>
      {% endif %}
      <td><a href="/feed?a={{ feed.gphoto_id.text }}">preview</a></td>
    </tr>
  {% endfor %}
{% endif %}
</table>

<br/><br/><br/><br/>

{% if not granted %}
  <h3>You have not granted Photo Organizer access to your private albums. Click <a  href="{{ grant_url }}">here</a> to do that.</h3>
{% endif %}

<!-- End user feeds -->
{% endblock %}
